import { Request } from '@/utils/request';

/**
 * 恢复照片
 * @param regenerantIds 要恢复的回收站垃圾ID
 * @returns
 */
export function restoreRegenerant(regenerantIds: Array<string | number>) {
  return Request.axiosInstance({
    url: '/recycler/restore',
    method: 'post',
    data: { regenerantIds: JSON.stringify(regenerantIds) }
  });
}

/**
 * 永久删除照片
 * @param regenerantIds 要删除的回收站垃圾ID
 * @returns
 */
export function destoryRegenerant(regenerantIds: Array<string | number>) {
  return Request.axiosInstance({
    url: '/recycler/destory',
    method: 'delete',
    params: { regenerantIds: JSON.stringify(regenerantIds) }
  });
}

/**
 * 清空回收站
 * @returns
 */
export function clearRecycler() {
  return Request.axiosInstance({
    url: '/recycler/clear',
    method: 'delete'
  });
}

/**
 * 获取回收站列表
 * @param page 页号
 * @param size 数量
 * @returns
 */
export function regenerantList(page: number, size: number) {
  return Request.axiosInstance({
    url: '/recycler/list',
    method: 'get',
    params: { page, size }
  });
}
